package xin.mashibo.pattern.templatemethod;

/**
 * 带有抽象方法的父类，其中定义了处理流程的框架
 *
 * @author MaShibo on 2018/4/4
 */
public abstract class AbstractDisplay {

    public abstract void open();

    public abstract void print();

    public abstract void close();

    public final void display() {
        open();
        for (int i = 0; i < 5; i++) {
            print();
        }
        close();
    }


}
